package com.lepton.wifidog;

import java.io.IOException;

import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@WebServlet("/portal/")
public class portalHandle extends HttpServlet {
	private static final long serialVersionUID = 4L;
	
	public portalHandle(){
		
	}
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response){
		String token = request.getParameter("gw_id");
		System.out.println("get method auth" + token);
		String url = "http://tooki.leptonnet.com/login.html";
		try {
			response.sendRedirect(url);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	
	protected void doPost(HttpServletRequest request, HttpServletResponse response){
		System.out.println("post method auth");
	}
}
